<template>
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
    <!-- <van-swipe-item>
      <van-image
        width="375"
        height="130"
        src="https://img2.baidu.com/it/u=3855123968,1108417120&fm=253&fmt=auto&app=120&f=JPEG?w=595&h=335"
      />
    </van-swipe-item>
    <van-swipe-item
      ><van-image
        width="375"
        height="130"
        :src="require('../../assets/test.jpg')"
    /></van-swipe-item>
    <van-swipe-item
      ><van-image
        width="375"
        height="130"
        src="https://img2.baidu.com/it/u=3855123968,1108417120&fm=253&fmt=auto&app=120&f=JPEG?w=595&h=335"
    /></van-swipe-item>
    <van-swipe-item
      ><van-image
        width="375"
        height="130"
        src="https://img2.baidu.com/it/u=3855123968,1108417120&fm=253&fmt=auto&app=120&f=JPEG?w=595&h=335"
    /></van-swipe-item> -->
    <van-swipe-item v-for="item of data.slides" :key="item.goodsId">
      <router-link :to="{ path: '/details', query: { id: item.goodsId } }"
        ><van-image :src="$resetUrl(item.image)"></van-image
      ></router-link>
    </van-swipe-item>
  </van-swipe>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      require: true,
    },
  },
};
</script>

<style>
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
</style>